<!-- Display limited career with relate to personality-->
<?php if (count($mycareer) > 0) {
?>

    <h2><u>My Selected Career </u></h2>

    <!--Search result - Retrieve the data from database and display the result-->

    <!--            Display the search result-->
    <form id="insForm" action="<?php echo site_url('career_display/deletecareer') ?>" method="post">
        <div style="margin-left:5px;">
            <br>
            <input type="button" id="checkAll" name="checkAll" value="Mark All/Un-mark All">
            <input type="submit" value="Delete Career" name="selectCarConfirm" id="selectCarConfirm">
        </div>
        <div style="margin-left:5px; margin-top:30px">

            <table id="table_career" border="1px" cellspacing="0px">
                <thead>
                    <tr>
                        <th> </th>
                        <th>Career</th>
                        <th>Career Category</th>
                        <th>Career Description</th>
                        <th>Riasec code</th>
                    </tr>
                </thead>
                <tbody>
                <?php
                foreach ($mycareer as $row) {
                ?>

                    <tr>
                        <td width="20px"><input type="checkbox" name="career_id[]" id="career_id" value="<?php echo $row->career_id; ?>">
                        </td>
                        <td><?php echo $row->career_name; ?></td>
                        <td><?php echo $row->career_category; ?></td>
                        <td><?php echo $row->career_description; ?></td>
                        <td><?php echo $row->riasec_code; ?></td>
                    </tr>

                <?php
                }
                ?>
            </tbody>
        </table>
    </div>
</form>
<br>

<!-- Remember need check if he takes the test or not first.-->
<?php } ?>
            <h2><u>Filter prior to Personality Test</u></h2>
            <br>
            <!-- Pre Search from the test -->
            <div id="courseSearch" style="margin-left:40px;">
                <form name="searchform" action="<?php echo site_url('career_display/searchfilter') ?>" method="POST">
                    <table>
                        <tr>
                            <th>Career List prior to Personality Test</th>
                            <td><select name="cate" id="cate">
                                    <option value="career_name" >Career</option>
                                    <option value="career_description" >Career Description</option>
                                    <option value="riasec_code">Riasec_code</option>
                                </select></td>
                            <td><input type="text" id="keyword" name="keyword" size="20"></td>
                            <td><input name="submitcourseSearch" id="Filter" value="Filter" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>

            <div id="searchResult" class="left">

                <!--            Display the search result-->
                <form id="insForm" action="<?php echo site_url('career_display/selcareer') ?>" method="post">
                    <div style="margin-left:5px;">
                        <br>
                        <input type="button" id="checkAll" name="checkAll" value="Mark All/Un-mark All">
                        <input type="submit" value="Select Career" name="selectCarConfirm" id="selectCarConfirm">
                    </div>
                    <div style="margin-left:5px; margin-top:30px">
                        <table id="table_career" border="1px" cellspacing="0px">
                            <thead>
                                <tr>
                                    <th></th>
                                    <th>Career</th>
                                    <th>Career Category</th>
                                    <th>Career Description</th>
                                    <th>Riasec code</th>
                                </tr>
                            </thead>
                            <tbody>
                    <?php
                    foreach ($filtercar as $row) {
                    ?>

                        <tr class="odd gradeA">
                            <td width="20px"><input type="checkbox" name="career_id[]" id="career_id" value="<?php echo $row->career_id; ?>"></td>
                            <td><?php echo $row->career_name; ?></td>
                            <td><?php echo $row->career_category; ?></td>
                            <td><?php echo $row->career_description; ?></td>
                            <td><?php echo $row->riasec_code; ?></td>
                        </tr>
                    <?php
                    }
                    ?>
                </tbody>
            </table>
        </div>
    </form>
</div>


<!-- Different Search-->

<div class="contentBody">

    <div class="left">
        <h2><u>Different Search Options</u></h2>
        <br>
        <!-- Search by keyword -->
        <div id="careerSearch" style="margin-left:40px;">
            <form name="searchform" action="<?php echo site_url('career_display/searchkeyword') ?>" method="POST">
                <table>
                    <tr>
                        <th>Search Career by Keyword</th>
                        <td><select name="cate" id="cate">
                                <option value="career_name" >Career</option>
                                <option value="career_description" >Career Description</option>
                            </select></td>
                        <td><input type="text" id="keyword" name="keyword" size="20"></td>
                        <td><input name="submitcareerSearch" id="Filter" value="Filter" type="submit"></td>
                    </tr>
                </table>
            </form>
        </div>
        <hr>

        <!-- Search by category -->

        <div id="careerSearch" style="margin-left:40px;">
            <form name="searchform" action="<?php echo site_url('career_display/searchcategory') ?>" method="POST">
                <table>
                    <tr>
                        <th>Search Career by Category</th>
                        <td><select name="cate" id="cate">
                                <?php
                                foreach ($categorylist as $row) {
                                ?>
                                    <option value="<?php echo $row->career_category; ?>" ><?php echo $row->career_category; ?></option>
                                <?php
                                }
                                ?>
                            </select></td>
                        <td><input name="submitcareerSearch" id="Filter" value="Filter" type="submit"></td>
                    </tr>
                </table>
            </form>
        </div>
        <hr>

        <div id="careerSearch" style="margin-left:40px;">
            <form name="searchform" action="<?php echo site_url('career_display/searchpersonality') ?>" method="POST">
                <h3>Search Career by Personality</h3>
                <table>
                    <tr>
                        <th>1st Type</th>
                        <td><select name="type1" id="type1">
                                <option value="">Select Here</option>
                                <option value="R">Realistic - R</option>
                                <option value="I">Investigative - I</option>
                                <option value="A">Artistic - A</option>
                                <option value="S">Social - S</option>
                                <option value="E">Enterprising - E</option>
                                <option value="C">Conventional - C</option>
                            </select></td>
                    </tr>
                    <tr>
                        <th>2nd Type</th>
                        <td><select name="type2" id="type2">
                                <option value="">Select Here</option>
                                <option value="R">Realistic - R</option>
                                <option value="I">Investigative - I</option>
                                <option value="A">Artistic - A</option>
                                <option value="S">Social - S</option>
                                <option value="E">Enterprising - E</option>
                                <option value="C">Conventional - C</option>
                            </select></td>
                    </tr>
                    <tr>
                        <th>3rd Type</th>
                        <td><select name="type3" id="type3">
                                <option value="">Select Here</option>
                                <option value="R">Realistic - R</option>
                                <option value="I">Investigative - I</option>
                                <option value="A">Artistic - A</option>
                                <option value="S">Social - S</option>
                                <option value="E">Enterprising - E</option>
                                <option value="C">Conventional - C</option>
                            </select></td>
                    </tr>
                    <td><input name="submitcareerSearch" id="Filter" value="Filter" type="submit"></td>



                </table>
            </form>
        </div>


    </div>
</div>


<!--Personality check-->